package com.zhoug.common3.encrypt;

/**
 * 数据加密常量类
 * @Author 35574
 * @Date 2021/10/15
 * @Description
 */
public class EncryptConstants {
    /**
     * 算法/模式/填充                16字节加密后数据长度        不满16字节加密后长度
     * AES/CBC/NoPadding             16                          不支持
     * AES/CBC/PKCS5Padding          32                          16
     * AES/CBC/ISO10126Padding       32                          16
     * AES/CFB/NoPadding             16                          原始数据长度
     * AES/CFB/PKCS5Padding          32                          16
     * AES/CFB/ISO10126Padding       32                          16
     * AES/ECB/NoPadding             16                          不支持
     * AES/ECB/PKCS5Padding          32                          16
     * AES/ECB/ISO10126Padding       32                          16
     * AES/OFB/NoPadding             16                          原始数据长度
     * AES/OFB/PKCS5Padding          32                          16
     * AES/OFB/ISO10126Padding       32                          16
     * AES/PCBC/NoPadding            16                          不支持
     * AES/PCBC/PKCS5Padding         32                          16
     * AES/PCBC/ISO10126Padding      32                          16
     */

    /**
     * 算法/模式/填充
     */
    public static final String TRANSFORMATION_AES_ECB_P7="AES/ECB/PKCS7Padding";//不能设置IV
    public static final String TRANSFORMATION_AES_CBC_P7="AES/CBC/PKCS7Padding";//需要设置IV
    public static final String TRANSFORMATION_RSA_NONE_P1="RSA/None/PKCS1Padding";//加密方式，标准jdk的
    public static final String TRANSFORMATION_RSA_NONE_NO="RSA/None/NoPadding";//加密方式，android的

    /**
     * 算法
     */
    public static final String ALGORITHM_AES="AES";
    public static final String ALGORITHM_RSA="RSA";

    /**
     * 模式
     */
    public static final String MODE_NONE="None";
    public static final String MODE_CBC="CBC";
    public static final String MODE_ECB="ECB";
    public static final String MODE_CFB="CFB";
    public static final String MODE_OFB="OFB";
    public static final String MODE_PCBC="PCBC";

    /**
     * 填充
     */
    public static final String PADDING_NONE="NoPadding";
    public static final String PADDING_PKCS1="PKCS1Padding";
    public static final String PADDING_PKCS5="PKCS5Padding";
    public static final String PADDING_PKCS7="PKCS7Padding";
    public static final String PADDING_ISO10126="ISO10126Padding";
}
